//引入
import Vue from 'vue'
import VueRouter from 'vue-router'
import dropdown from '../views/dropdown/index'
import guideVue from '../views/guide/index'
import navigationbar from '../views/navigationbar/index'
import tip from '../views/tip/index'
import gallery from '../views/gallery/index'
import opacity from '../views/opacity/index'
import imagemosaic from '../views/imagemosaic/index'
import simpleform from '../views/simpleform/index'
import borderimg from '../views/borderimg/index'
import button from '../views/button/index'
import myElInput from '../el-views/input/index'
import myButton from '../el-views/button/index'
import myCascader from '../el-views/cascader/index'
import mySelect from '../el-views/select/index'
import myLayout from '../el-views/layout/index'
import myRadio from '../el-views/radio/index'
import myCheckBox from '../el-views/checkbox/index'
import myInputNumber from '../el-views/inputnumber/index'
import mySwitch from '../el-views/switch/index'
import mySlider from '../el-views/slider/index'
import myTimePicker from '../el-views/timePicker/index'
import myDatePicker from '../el-views/datePicker/index'
import myDateTimePicker from '../el-views/dateTimePicker/index'
import myUpLoad from '../el-views/upload/index'
import myRate from '../el-views/rate/index'
import myTransfer from '../el-views/transfer/index'
import myForm from '../el-views/form/index'
import myTable from '../el-views/table/index'

//使用
Vue.use(VueRouter)

// 定义 组件
const indexPage = {template: '<div> hello </div>'}
const homePage = {template: '<div> Home </div>'}

// 设置路由数组
const routes = [
    {
        path: "/index",
        component: guideVue
    },
    {
        path: "/dropdown",
        component: dropdown
    },
    {
        path: "/navigationbar",
        component: navigationbar
    },
    {
        path: "/tip",
        component: tip
    },
    {
        path: "/gallery",
        component: gallery
    }
    ,
    {
        path: "/opacity",
        component: opacity
    }
    ,
    {
        path: "/imagemosaic",
        component: imagemosaic
    }
    ,
    {
        path: "/simpleform",
        component: simpleform
    }
    ,
    {
        path: "/borderimg",
        component: borderimg
    }
    ,
    {
        path: "/button",
        component: button
    }

    /*elment系列*/
    ,
    {
        path: "/el-myElInput",
        component: myElInput
    }
    ,
    {
        path: "/el-myButton",
        component: myButton
    }
    ,
    {
        path: "/el-mySelect",
        component: mySelect
    }
    ,
    {
        path: "/el-myCascader",
        component: myCascader
    }
    ,
    {
        path: "/el-myLayout",
        component: myLayout
    }
    ,
    {
        path: "/el-myRadio",
        component: myRadio
    }
    ,
    {
        path: "/el-myCheckBox",
        component: myCheckBox
    }
    ,
    {
        path: "/el-myInputNumber",
        component: myInputNumber
    }
    ,
    {
        path: "/el-mySwitch",
        component: mySwitch
    }
    ,
    {
        path: "/el-mySlider",
        component: mySlider
    }
    ,
    {
        path: "/el-myTimePicker",
        component: myTimePicker
    }
    ,
    {
        path: "/el-myDatePicker",
        component: myDatePicker
    }
    ,
    {
        path: "/el-myDateTimePicker",
        component: myDateTimePicker
    }
    ,
    {
        path: "/el-myUpLoad",
        component: myUpLoad
    }
    ,
    {
        path: "/el-myRate",
        component: myRate
    }
    ,
    {
        path: "/el-myTransfer",
        component: myTransfer
    }
    ,
    {
        path: "/el-myForm",
        component: myForm
    }
    ,
    {
        path: "/el-myTable",
        component: myTable
    }

];

// 创建路由
const router = new VueRouter({
    routes   //(缩写) 相当于 routes: routes
})

//导出对象
export default router